<div class="operateBox">
  <div id="p_toolbar"></div>
  <h2><?php echo $this->title?></h2>
</div>

<form class="box-2col-w tabB" id="form1">
  <input type="hidden" id="data_id" name="data_id" value="<?php echo $data['id'];?>" />
  <div class="right-small"><fieldset class="post-col">
    <div class="sh">标题：</div>
    <div class="sp"><input class="wide update" name="data[title]" type="text" value="<?php e_qh($data['title']);?>"  maxlength="50" /></div>
    <div class="sh">栏目：</div>
    <div class="sp"><a class="p-browseBut" onClick="w_open('?u=cgoods\\sort\\a-fselect&M&callFun=addSort','sel_sort',300)"><?php lang::_g('select');?></a>
    	<div id="p_sort_added">
           <?php if($sort_R)foreach($sort_R as $_v){?>
            <span><input type="hidden" class="update" value="<?php e_h($_v['id'])?>" /><?php echo $_v['id'].','; e_h($_v['name'])?><a class="icon-16-drop"></a>&nbsp;</span>
           <?php }?>
        </div>
        <div id="p_sort_new"></div>     
    </div>
    <div class="sh">图片：</div>
    <div class="sp"><a class="p-browseBut" onClick="openFileWin('callFun=addFiles', 'M')"><?php lang::_g('browse')?></a>
        <div id="p_file_added"><?php if($file_R)foreach($file_R as $v){?>
        	<p><input type="hidden" class="update" value="<?php e_h($v['path'])?>" /><?php e_h($v['name'])?><a class="icon-16-drop"></a></p>
            <?php }?>
        </div>
        <div id="p_file_new"></div>
    </div>
    <div class="sh">缩略图：</div>
    <div class="sp"><input name="data[pic]" type="text" id="p_pic" value="<?php e_h($data['pic']);?>"  />&nbsp;<a class="p-browseBut" onclick="openFileWin('set_obj=p_pic&set_val=id');"><?php lang::_g('browse')?></a></div>
    <div class="sh">商品条码：</div>
    <div class="sp"><input class="wide update" name="data[barcode]" type="text" value="<?php e_h($data['barcode']);?>" /></div>
    <div class="sh">金额：</div>
    <div class="sp"><input class="wide update" name="data[money]" type="text" value="<?php echo $data['money'];?>" /></div>

    <div class="sh">市场售价：</div>
    <div class="sp"><input class="wide update" name="data[money_old]" type="text" value="<?php echo $data['money_old'];?>" /></div>
    
    <div class="sh">库存数量：<span class="textNote">小于1时，不开售</span></div>
    <div class="sp"><input class="wide update" name="data[num]" type="text" value="<?php echo $data['num'];?>" /></div>
    
    <div class="sh">邮费：</div>
    <div class="sp"><input class="wide update" name="data[freight_money]" type="text" value="<?php e_h($data['freight_money']);?>" /></div>
    
    
    <div class="separator"></div>
    <div class="sh">关键词：<span class="textNote">seo</span></div>
    <div class="sp"><input class="wide update" name="data[keyword]" type="text" value="<?php e_h($data['keyword']);?>" maxlength="12" /></div>
    <div class="sh">访问量：</div>
    <div class="sp"><input class="int update" name="data[hits]" type="text" value="<?php echo $data['hits'];?>" size="8" /><a class="p-browseBut" onclick="$(this).siblings('input')[0].value=creNum()"><?php lang::_g('auto create')?></a></div>
    
    
    <div class="sh">链接标题：<span class="textNote">不定义则为主标题</span></div>
    <div class="sp"><input class="wide update" name="data[url_title]" type="text" value="<?php e_h($data['url_title']);?>"  /></div>
    <div class="sh">布局：</div>
    <div class="sp"><?php html::selectR('name="data[layout_id]" class="update"', YF_f::initC('\c\layout\g')->li('goods'), $data['layout_id'], lang::g('default'));?></div>
    <div class="sh">状态：</div>
    <div class="sp"><?php html::radio('name="data[state]"', lang::Ag($this->State), $data['state'])?></div>
  </fieldset></div>
  
  <div class="left-big">
    <ul class="tabTitleB"><li class="tab-t">介绍</li><li class="tab-t">属性</li></ul>
    <div class="tab-c">
    <table class="ta_l" width="100%">
      <tr>
        <th align="right" width="50">简要：</th>
        <td><input class="update" style="width:99%" name="data[description]" type="text" value="<?php e_h($data['description']);?>" /></td>
      </tr>
      <tr>
        <th align="right">内容：</th>
        <td><textarea name="data_content" class="none"><?php echo htmlspecialchars($data['content'])?></textarea></td>
      </tr>
      <tr>
        <th align="right"></th>
        <td><label><input type="checkbox" name="down_pic" value="1">内容图片保存到服务器</label></td>
      </tr>
    </table>
    </div>
    <div class="tab-c post-tr">
      <div class="sh"></div>
      <div class="sp"><?php html::selectR('class="update" name="data[type_id]" id="p_sel_type"', $type_R, $data['type_id'], '选择：')?></div>
      
      <div class="separator"></div>
      <div class="sh">品牌：</div>
      <div class="sp"><input class="update" id="p_company_id" name="data[company_id]" size="26" type="text" value="<?php if($data['company_id'])e_h($data['company_id']);?>" /></div>
      <div id="d_switch"><?php if($data['type_id'])$this->AttrC->post($data['type_id'], $data['id'])?></div>
        
    </div>
  </div>
  <div class="cl"></div>
</form>

<form class="right-small" id="lpi_form"> 
   <fieldset class="post-col"><legend><a href="?u=clayout\plate\propel" target="_blank">推送到板块</a></legend>
    <div><?php html::selectR('name="plate_id" id="lpi_id" multiple style="50px; width:99%"', YF_f::initC('\c\layout\plate\g')->typeList('\c\goods\g cp_recom'), '', null);?></div>
    <div><button class="submit" id="lpi_but_send" type="button">发送</button><span class="textNote" id="lpi_note"></span></div>
   </fieldset>
</form>
<?php html::pushHead('ckeditor/ckeditor.js');?>
<script type="text/javascript">
CKEDITOR.replace('data_content',{height:700});

var c_U='?u=c<?php e_a(YF_f::$arr['c'])?>';
loadScript('t-info_post.js');
tabs();
$('#p_sel_type').change(function(){$.get('?u=cattribute\\m-fsw_post&type_id='+ this.value, '', function(r){$('#d_switch').html(r);});});
if($('#data_id').val()!='')post_updatedField('#form1');

SearchWordAC('#p_company_id', '?u=ccompany\\g-fsearchWord&w=');
</script>